<%@ page language="java" contentType="text/html; charset=UTF-8" import="work.atpgroup.entity.User"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:choose>
    <c:when test="${user!=null}">
        <div class="enroll container">
            <div>
                <a href="${pageContext.request.contextPath}/admin/webPage-list">已登录</a>
            </div>
            <div><a href="${pageContext.request.contextPath}/admin/webPage-list">${user.username}</a></div>
            <div><a href="${pageContext.request.contextPath}/">主页</a></div>
            <div><a href="${pageContext.request.contextPath}/logout">注销</a></div>
        </div>
    </c:when>
    <c:otherwise>
        <div class="enroll container">
            <div>
                <a href="${pageContext.request.contextPath}/register">注册</a>
            </div>
            <div><a href="${pageContext.request.contextPath}/login">登录</a></div>
        </div>
    </c:otherwise>
</c:choose>